home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Demos / Tools / AppMaker / Examples / pre-built AMReminder / Procedural / Dispatcher.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-04  |  2.5 KB  |  152 lines  |  [TEXT/MMCC]

  1. /* Dispatcher.c -- dispatcher for windows and for modeless dialogs */
  2. /* Created 01/01/95 12:01 PM by AppMaker */
  3.  
  4. #include <Types.h>
  5. #include <Quickdraw.h>
  6. #include <Controls.h>
  7. #include <Dialogs.h>
  8. #include <Events.h>
  9. #include <Lists.h>
  10. #include <Menus.h>
  11. #include <TextEdit.h>
  12. #include "MainWindow.h"
  13. #include "Globals.h"
  14. #include "Dispatcher.h"
  15.  
  16. /*----------*/
  17. void DoIdle (void)
  18. {
  19. } /*DoIdle*/
  20.  
  21. /*----------*/
  22. void OpenWindows    (Str255            fName,
  23.                      short            vRefNum,
  24.                      short            fRefNum)
  25. {
  26.  
  27.     OpenMainWindow (fName, vRefNum, fRefNum);
  28.  
  29. } /*OpenWindows*/
  30.  
  31. /*----------*/
  32. void CloseCurWindow (void)
  33. {
  34.     switch (cur->windowKind) {
  35.         case WMainWindow:
  36.                 CloseMainWindow ();
  37.             break;
  38.  
  39.     } /*switch*/
  40. } /*CloseCurWindow*/
  41.  
  42. /*----------*/
  43. void DoControl        (ControlHandle    whichControl,
  44.                      short            whichPart,
  45.                      Point            where)
  46. {
  47.     switch (cur->windowKind) {
  48.         case WMainWindow:
  49.                 ControlMainWindow (whichControl, whichPart, where);
  50.             break;
  51.  
  52.     } /*switch*/
  53. } /*DoControl*/
  54.  
  55. /*----------*/
  56. void MouseInContent    (Point        where,
  57.                      short        modifiers)
  58. {
  59.     switch (cur->windowKind) {
  60.         case WMainWindow:
  61.                 MouseInMainWindow (where, modifiers);
  62.             break;
  63.  
  64.     } /*switch*/
  65. } /*MouseInContent*/
  66.  
  67. /*----------*/
  68. void TypeInWindow    (char    ch)
  69. {
  70.     switch (cur->windowKind) {
  71.         case WMainWindow:
  72.                 TypeInMainWindow (ch);
  73.             break;
  74.  
  75.     } /*switch*/
  76. } /*TypeInWindow*/
  77.  
  78. /*----------*/
  79. void UpdateContent (void)
  80. {
  81.     switch (cur->windowKind) {
  82.         case WMainWindow:
  83.                 UpdateMainWindow ();
  84.             break;
  85.  
  86.     } /*switch*/
  87. } /*UpdateContent*/
  88.  
  89. /*----------*/
  90. void ActivateContent (Boolean    activate)
  91. {
  92.     switch (cur->windowKind) {
  93.         case WMainWindow:
  94.                 ActivateMainWindow (activate);
  95.             break;
  96.  
  97.     } /*switch*/
  98. } /*ActivateContent*/
  99.  
  100. /*----------*/
  101. void ResizeContent (void)
  102. {
  103.     switch (cur->windowKind) {
  104.         case WMainWindow:
  105.                 ResizeMainWindow ();
  106.             break;
  107.  
  108.     } /*switch*/
  109. } /*ResizeContent*/
  110.  
  111. /*----------*/
  112. pascal void ScrollWindow    (short        newValue,
  113.                              short        oldValue)
  114. {
  115.     switch (cur->windowKind) {
  116.         case WMainWindow:
  117.                 ScrollMainWindow (newValue, oldValue);
  118.             break;
  119.  
  120.     } /*switch*/
  121. } /*ScrollWindow*/
  122.  
  123. /*----------*/
  124. void InitModelessDialogs (void)
  125. {
  126.  
  127. } /*InitModelessDialogs*/
  128.  
  129. /*----------*/
  130. void CloseModelessDialog (DialogPtr        whichDialog)
  131. {
  132.  
  133. } /*CloseModelessDialog*/
  134.  
  135. /*----------*/
  136. Boolean FilterModeless    (DialogPtr        whichDialog,
  137.                          EventRecord    *event,
  138.                          short            *itemHit)
  139. {
  140.  
  141.     return (false);
  142. } /*FilterModeless*/
  143.  
  144. /*----------*/
  145. void DoModelessItem        (DialogPtr        whichDialog,
  146.                          short            itemNr)
  147. {
  148.  
  149. } /*DoModelessItem*/
  150.  
  151. /* Dispatcher */
  152.